<?php
/**
 * Created by PhpStorm.
 * User: 宋家森
 * Date: 2017/7/10 0010
 * Time: 下午 2:34
 */
namespace App\Http\Controllers\Tests;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class IndexController extends Controller{

    public function index(){

    }

    /**
     * @return string 普通get测试
     */
    public function testGet(Request $request){
        echo "testGet:success";
    }

    /**
     * @return string session测试
     */
    public function testSession(Request $request){
        //session(['test' => 'value']);
        //$data = $request->session()->all();

        //$request->session()->put('key', 'value');
        $value = $request->session()->pull('key');
        dd($value);
        return "testSession:success";
    }
}